﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TSL.Web.UI
{
    public class DataSearch
    {
        public static string SearchString(string className, string txtString)
        {
            string strSql = "";
            if (string.IsNullOrEmpty(txtString))
            {
                return strSql;
            }
            if (className.Equals("SSC_info"))
            {
                strSql = "  ssc_id = '" + txtString + "'";
            }
            if (className.Equals("Buy_SSC"))
            {
                strSql = "ssc_id in (select sscname from caipiao where id=" + txtString + ")";
            }
            if (className.Equals("sys_bank"))
            {
                strSql = "classtype in(select id from betmenu where caipiao_id=" + txtString + ")";
            }
            if (className.Equals("CQ_bank"))
            {
                strSql = "classtype  in (" + txtString + ")";
            }
            if (className.Equals("SSC_EndTime"))
            {
                strSql = "ssc_id=" + txtString;
            }
            if (className.Equals("leixing"))
            {
                strSql = "follows like '%" + txtString + "%'";
            }
            if (className.Equals("BetMenu"))
            {
                strSql = "  caipiao_id = '" + txtString + "'";
            }
            return strSql;
        }
    }
}
